<template>
	<view class="content">
		<view class="body" >
			<view class="top">
				<text class="title">系统消息:</text>
				<text class="time">{{messageDetail.create_time}}</text>
			</view>
			<text class="detail">{{messageDetail.message}}</text>
		</view>
	</view>
</template>

<script>
	import API from "@/api/my.js"
	export default {
		onLoad(options) {
			this.systemMessageId = options.systemMessageId
			console.log(this.systemMessageId)
			this.getMessageDetail()
		},
		onShow() {
			
		},
		data(){
			return {
				messageDetail:{},
				systemMessageId:''
			}
		},
		methods:{
			
			getMessageDetail(){
				// let token = uni.getStorage({
				// 	token
				// })
				let systemMessageId = this.systemMessageId
				API.getMessageDetail({systemMessageId:systemMessageId}).then(res=>{
					this.messageDetail = res.data
					
					// console.log(this.messageDetail)
				})
			}
		}
	}
</script>

<style scoped>
	.body{
		width: 96%;
		height: auto;
		margin: 20rpx auto;
		border-radius: 14rpx;
		background-color: #FFFFFF;
		padding: 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.top{
		margin-bottom: 10rpx;
		display: flex;
		justify-content: space-between;
	}
	.title{
		font-size: 30rpx;
		font-weight: bold;
	}
	.time{
		font-size: 26rpx;
		color: #848484;
	}
	.detail{
		text-indent: 2em;
		color: #848484;
	}
</style>
